package action.creditmanage;

import java.util.List;

import core.action.BaseAction;

import service.creditmanage.CreditManageService;

public class CreditInAction extends BaseAction{
	private CreditManageService creditManageService;
	private List contractList;
	private Integer id;
	private String FLAG;
	private String type;
	private String backmethod;

	public String execute(){
		return "success";
	}
	
	public String doing(){
		setFLAG("DO");
		contractList=creditManageService.getInList();
		return "success";
	}
	
	public String done(){
		setFLAG("DONE");
		contractList=creditManageService.getInDoneRecord(backmethod);
		super.successResultValue="/WEB-INF/content/creditmanage/indonelist.jsp";
		return "function";
	}
	
	public String change(){
		creditManageService.changeState(id,"in",type);
		MessageJump("确认成功!","creditIn!doing");	
		return "message";
	}
	
	public String printSure(){
		creditManageService.changePrintDate(id,"in");
		MessageJump("打印确认成功!","creditIn!doing");	
		return "message";
	}
	//~~~	public String doing(){
	public String aheadDoing(){
		setFLAG("AHEAD");
		contractList=creditManageService.getInList();
		return "success";
	}
	
	//~~~~~~~~~~~~~~~~~~~~~~~~``
	public CreditManageService getCreditManageService() {
		return creditManageService;
	}

	public void setCreditManageService(CreditManageService creditManageService) {
		this.creditManageService = creditManageService;
	}

	public List getContractList() {
		return contractList;
	}

	public void setContractList(List contractList) {
		this.contractList = contractList;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getBackmethod() {
		return backmethod;
	}

	public void setBackmethod(String backmethod) {
		this.backmethod = backmethod;
	}

	public String getFLAG() {
		return FLAG;
	}

	public void setFLAG(String fLAG) {
		FLAG = fLAG;
	}
}
